If the extension doesn't exist in the `this._extensions` Map, we'd try
to access `extension.dir` on undefined/null. So set the `dir` variable
after checking if `extension` is defined.
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/96
_callExtensionInit(uuid) {
let extension = this.lookup(uuid);
- let dir = extension.dir;
-
if (!extension)
throw new Error("Extension was not properly created. Call createExtensionObject first");
+ let dir = extension.dir;
let extensionJs = dir.get_child('extension.js');
if (!extensionJs.query_exists(null)) {
this.logExtensionError(uuid, new Error('Missing extension.js'));